package geektime.concurrent.part3;

/**
 * 定义车类型
 */
public class Car {
    int id;
    int manufacturedId;
    String model;
    int year;
    float rating;

    public Car(int id, int manufacturedId, String model, int year) {
        this.id = id;
        this.manufacturedId = manufacturedId;
        this.model = model;
        this.year = year;
    }

    public void setRating(float rating) {
        this.rating = rating;
    }

    @Override
    public String toString() {
        return "Car{" +
            "id=" + id +
            ", manufacturedId=" + manufacturedId +
            ", model='" + model + '\'' +
            ", year=" + year +
            ", rating=" + rating +
            '}';
    }
}
